﻿<UserControl x:Class="IsikFx.Project.ClientApp.Content.WatchmanEntryAndUpdate"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <Style x:Key="DataGridContentCellCentering" TargetType="{x:Type DataGridCell}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridCell}">
                        <Grid Background="{TemplateBinding Background}">
                            <ContentPresenter VerticalAlignment="Center" />
                            <ContentPresenter HorizontalAlignment="Center" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Label Name="lblEmptyData" Content="Seçilen tarih için nöbetçi bulunamadı." Width="Auto" Height="Auto" Visibility="Hidden" VerticalAlignment="Center"/>
        <DataGrid Grid.Row="0" RowHeaderWidth="0" CellStyle="{StaticResource DataGridContentCellCentering}" Height="Auto" 
          Name="dataWatchmen"  BorderThickness="1" 
          BorderBrush="Black" VerticalAlignment="Top" Width="Auto" AlternatingRowBackground="AliceBlue" 
          AutoGenerateColumns="False"  CanUserAddRows="False" AlternationCount="2" GridLinesVisibility="All" Loaded="dataWatchmen_Loaded_1"  HeadersVisibility="All"
                  SelectionMode="Single" SelectionUnit="Cell" ClipboardCopyMode="None" Margin="0" HorizontalAlignment="Stretch" HorizontalGridLinesBrush="#FF020202" VerticalGridLinesBrush="Black" RowBackground="#FFCBCBCB" >
            <DataGrid.Columns>
                <DataGridTextColumn Width="*" IsReadOnly="True" Binding="{Binding WatchmanName}" Header="Nöbetçi Adı" MinWidth="0"  />
                <DataGridTextColumn Width="*" IsReadOnly="True" Binding="{Binding WatchmanSurname}" Header="Nöbetçi Soyadı" MinWidth="0"  />
                <DataGridTemplateColumn Width="SizeToCells" >
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Button Content="Sil" Click="Button_Click_1" />
                            </StackPanel>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>


        <StackPanel Grid.Row="1" Height="200" VerticalAlignment="Top" >
            <Grid Height="198">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>


                </Grid.RowDefinitions>
                <Label Content="Personel Seçimi:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                <ComboBox Name="cbSalesPersonel" Width="Auto" Loaded="cbSalesPersonel_Loaded_1" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"/>
                <Label Content="Tarih:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <DatePicker Name="watchmanDate" SelectedDateChanged="watchmanDate_SelectedDateChanged_1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" />
                <Button Name="btnAddWatchmanChanges" Click="btnAddWatchmanChanges_Click_1" Content="Ekle" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Background="Khaki"/>
                <Button Name="btnSaveWatchmanChanges" Click="btnSaveWatchmanChanges_Click_1" Content="Değşiklikleri Kaydet" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Background="Khaki"/>
            </Grid>
        </StackPanel>
    </Grid>

</UserControl>
